import http from "@/api/axios";
import { BusinessType } from "@/api/moduleConfig";
export const getListApi = (data: SingleOrderApproval.SearchParams) => {
  return http({
    method: "post",
    url: `${BusinessType.finance}/biz/receivableBil/queryPage`,
    data
  });
};
export const getPageStaticApi = (data: DepositRegister.SearchParams) => {
  return http({
    method: "post",
    url: `${BusinessType.finance}/biz/receivableBil/queryPageCount`,
    data
  });
};
// 修改备注
export const updateRemarkApi = (data: ReceivableFee.CreateBillForm) => {
  return http({
    method: "post",
    url: `${BusinessType.finance}/biz/receivableBil/updateRemark`,
    data
  });
};
// 撤销账单
export const reverseBillApi = (data: Array<string>) => {
  return http({
    method: "post",
    url: `${BusinessType.finance}/biz/receivableBil/revocationBill`,
    data
  });
};
// 根据客户ID查询流水
export const getDepositByCustomerIdApi = (params: { customerId: string }) => {
  return http({
    method: "get",
    url: `${BusinessType.finance}/biz/deposit/getDepositByCustomerId`,
    params
  });
};
// 获取 账单费用明细列表
export const getBillCostsApi = (data: ReceivableStatement.BillCostsParams) => {
  return http({
    method: "post",
    url: `${BusinessType.finance}/biz/receivableBil/getBillCosts`,
    data
  });
};
// 核销账单
export const chargeOffBillApi = (data: ReceivableStatement.ChargeOffBillForm) => {
  return http({
    method: "post",
    url: `${BusinessType.finance}/biz/receivableBil/chargeOffBill`,
    data
  });
};
// 移入移出费用
export const shiftOrOutCostApi = (data: ReceivableStatement.ShiftOrOutCostForm) => {
  return http({
    method: "post",
    url: `${BusinessType.finance}/biz/receivableBil/shiftINOrOutCost`,
    data
  });
};
// 反核销
export const reverseChargeOffBillApi = (data: { id: string }) => {
  return http({
    method: "post",
    url: `${BusinessType.finance}/biz/receivableBil/reverseChargeOffBill`,
    data
  });
};
// 日志
export const statementLogApi = (data: { receivableBillNums?: string[]; type: number; orderNums?: string[]; businessIdList?: string[] }) => {
  return http({
    method: "post",
    url: `${BusinessType.finance}/biz/orderShipmentQuotationLog/queryList`,
    data
  });
};
// 查看移入费用列表
export const getFeeListApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: `${BusinessType.finance}/biz/receivableBil/getShiftINCosts`,
    data
  });
};
// 统计
export const statisticsDataApi = (data: SingleOrderApproval.SearchParams) => {
  return http({
    method: "post",
    url: `${BusinessType.finance}/biz/receivableBil/receivableBilStatistics`,
    data
  });
};

// 导出
export const receivableBillExcelApi = (data: SingleOrderApproval.SearchParams) => {
  return http({
    method: "post",
    url: `export/biz/exportExcel/receivableBillExcel`,
    data
  });
};

// 账单导出
export const receivableBillApi = (data: SingleOrderApproval.SearchParams) => {
  return http({
    method: "post",
    url: `export/biz/exportExcel/customerBillExcel`,
    data,
    responseType: "blob",
    headers: {
      enable: true
    }
  });
};

// 账单导出
export const customerBillItemExcelApi = (data: SingleOrderApproval.SearchParams) => {
  return http({
    method: "post",
    url: `export/biz/exportExcel/customerBillItemExcel`,
    data,
    responseType: "blob",
    headers: {
      enable: true
    }
  });
};
